<template>
  <div>
    <t-sticky>
      <t-navbar
        title="反馈记录"
        :fixed="false"
        left-arrow
        @left-click="handleBack"
      />
    </t-sticky>
    <div class="wrapper">
      <div
        v-for="(item, index) in listData"
        :key="index"
        class="item-box"
        @click="onCopy(item)"
      ></div>
    </div>
  </div>
</template>
<script setup>
import { reactive, toRefs, onMounted } from "vue";
import { Toast } from "tdesign-mobile-vue";
import { useRouter } from "vue-router";
import myApi from "@/api/myApi";
import img1 from "@/assets/my/qq.png";
import img2 from "@/assets/my/wechat.png";
import img3 from "@/assets/my/tg.png";
const router = useRouter();
const state = reactive({
  listData: [],
});
const { listData } = toRefs(state);
// 返回上一页
const handleBack = () => {
  router.back();
};
// 获取列表数据
async function getList() {
  const result = await myApi.community();
  console.log("result", result);
  state.listData = result.data;
}
onMounted(() => {
  getList();
});
</script>
<style lang="scss" scoped>
.wrapper {
  min-height: calc(100vh - 48px);
  background-color: $bf5-color;
  box-sizing: border-box;
  overflow-y: scroll;
  padding: 15px;
  &::-webkit-scrollbar {
    display: none; /* 直接隐藏滚动条 */
  }
  .item-box {
    background-color: $b-color;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 10px;
    .img {
      width: 40px;
      height: 40px;
      display: block;
    }
    .info {
      flex: 1;
      color: $b10-color;
      font-size: 14px;
      font-weight: 550;
      padding-left: 10px;
      text-align: left;
    }
  }
}
</style>
